﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Style x:Key="ColumnHeaderStyle" TargetType="DataGridColumnHeader">
        
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="ToolTip" Value="Click to sort."/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="GroupItemStyle" TargetType="GroupItem">
        <Setter Property="Margin" Value="0,0,0,5"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GroupItem}">
                    <Expander IsExpanded="True" Background="#FF112255" BorderBrush="#FF002255" BorderThickness="1,1,1,5">
                        <Expander.Header>
                            <DockPanel>
                                <TextBlock FontWeight="Bold" Text="{Binding Path=Name}" Margin="5,0,0,0" Width="100"/>
                                <TextBlock FontWeight="Bold" Text="{Binding Path=ItemCount}"/>
                            </DockPanel>
                        </Expander.Header>
                        <Expander.Content>
                            <ItemsPresenter />
                        </Expander.Content>
                    </Expander>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>  
    <DataTemplate x:Key="DataGridGroupHeaderDataTemplate">        
            <DockPanel Background="LightBlue">
                <TextBlock Text="{Binding Path=Name}" Foreground="Blue" Margin="30,0,0,0" Width="100"/>
                <TextBlock Text="{Binding Path=ItemCount}" Foreground="Blue"/>
            </DockPanel>        
    </DataTemplate>
    <Style x:Key="DataGridStyle" TargetType="{x:Type DataGrid}" >
        <Setter Property="ColumnHeaderStyle" Value="{StaticResource ColumnHeaderStyle}"/>        
    </Style>   

    
</ResourceDictionary>